package Tests;

import org.junit.jupiter.api.BeforeAll;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;

import java.util.concurrent.TimeUnit;

public class AutoTestUtils {
    public static WebDriver webDriver;
    @BeforeAll
    static void setUp() {
        //判断驱动对象是否已经创建
        if(webDriver == null) {
            webDriver = new ChromeDriver();
            //创建隐式等待，确保页面渲染出来
            webDriver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);

        }
        //把画面放到最大
        webDriver.manage().window().maximize();
    }

}
